home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / misc / emu / flamingo.lha / Flamingo / sources / aga-delta.asm next >
Encoding:
Assembly Source File  |  1999-07-04  |  11.6 KB  |  708 lines

  1. ; AGA-Delta
  2. ; External Video Driver for
  3. ; Flaming Plus/4 emulator for the Amiga
  4. ;
  5. ; version 1.1
  6.  
  7.     MACHINE    68020
  8.  
  9.         INCDIR    Include:
  10.  
  11.     INCLUDE exec/types.i
  12.     INCLUDE    exec/memory.i
  13.     INCLUDE    exec/exec_lib.i
  14.     INCLUDE    utility/tagitem.i
  15.     INCLUDE    intuition/intuition.i
  16.     INCLUDE    intuition/intuition_lib.i
  17.     INCLUDE    intuition/screens.i
  18.     INCLUDE    graphics/graphics_lib.i
  19.     INCLUDE graphics/modeid.i
  20.     INCLUDE    graphics/rastport.i
  21.     INCLUDE    dos/dos.i
  22.     INCLUDE    dos/dos_lib.i
  23.     INCLUDE    libraries/asl.i
  24.     INCLUDE    libraries/asl_lib.i
  25.     INCLUDE    macros.i
  26.  
  27. ;*** Handler structure
  28.  
  29.  STRUCTURE vxd_handler,0
  30.   LONG intuibase
  31.   LONG graphbase
  32.   LONG dosbase
  33.   LONG aslbase
  34.   LONG myscr
  35.   LONG mywin
  36.   LONG planes
  37.   WORD xsize
  38.   WORD ysize
  39.   LONG chunkysize
  40.   LONG palette
  41.   LONG palette32
  42.   LONG emuscr
  43.   LONG delta
  44.   LONG scrmodereq
  45.   LONG screendim
  46.   WORD bytesperrow
  47.  LABEL    vxd_handler_SIZEOF
  48.  
  49.  STRUCTURE c2p,4
  50.   LONG C2PChunkyBufferAddress
  51.   LONG C2PDeltaBufferAddress
  52.   LONG C2PPlanarBufferAddress
  53.   LONG C2PChunkyBufferWidth
  54.   LONG C2PChunkyBufferWidthDiv8
  55.   LONG C2PChunkyBufferHeight
  56.   LONG C2PChunkyBufferSize
  57.   LONG C2PBitplaneByteWidth
  58.  LABEL c2p_SIZEOF
  59.  
  60. JSRLIB    MACRO
  61.     jsr    _LVO\1(a6)
  62.     ENDM
  63.  
  64. ;*** Let's begin
  65.  
  66.     moveq.l    #0,d0
  67.     rts
  68.  
  69.     dc.b "FLAMINGOXVD"
  70.     dc.b "1"
  71.  
  72.     dc.l Name
  73.     dc.l Author
  74.     dc.w 1
  75.     dc.w 1
  76.  
  77.     dc.l drv_Init
  78.     dc.l drv_Done
  79.     dc.l drv_Configure
  80.     dc.l drv_OpenScreen
  81.     dc.l drv_CloseScreen
  82.     dc.l drv_Refresh
  83.  
  84. Name:    dc.b    "AGA-Delta External Video Driver",0
  85. Author:    dc.b    "Álmos Rajnai (original C2P by Ferenc Zavacki)",0
  86.  
  87.     EVEN
  88.  
  89. ;*** Functions
  90.  
  91. drv_Init:
  92.     movem.l    a0-a1,-(sp)    ;Saving infos
  93.     move.l  4.w,a6        ;Alloc memory for handler
  94.     move.l    #MEMF_PUBLIC|MEMF_CLEAR,d1
  95.     move.l    #vxd_handler_SIZEOF,d0
  96.     JSRLIB    AllocVec
  97.     movem.l    (sp)+,a0-a1    ;Recover infos
  98.         tst.l    d0
  99.     beq.b    .1        ;No mem
  100.     movea.l    d0,a2
  101.         move.l    (a0),graphbase(a2)    ;Saving graphics.library base
  102.         move.l    4(a0),dosbase(a2)    ;Saving dos.library base
  103.         move.l    8(a0),intuibase(a2)    ;Saving intuition.library base
  104.         move.l    16(a0),aslbase(a2)    ;Saving asl.library base
  105.         movem.l    d0,-(sp)
  106.  
  107.     move.l    dosbase(a2),a6        ;Reading config file
  108.     move.l    #configfile,d1        ;Config file is pretty simple:
  109.     move.l    #MODE_OLDFILE,d2    ;only a screenmode number
  110.     JSRLIB    Open
  111.     tst.l    d0
  112.     beq.b    .2            ;Failed open
  113.     move.l    d0,d1
  114.     move.l    (sp),a0
  115.     lea    screendim(a0),a0
  116.     move.l    a0,d2
  117.     moveq.l    #4,d3
  118.     movem.l    d0,-(sp)
  119.     JSRLIB    Read            ;Reading the 4 bytes
  120.     cmp.l    #4,d0
  121.     beq.b    .3
  122.     move.l    (sp),a0            ;Failed: set 0 instead garbage
  123.     move.l    #0,screendim(a0)
  124.  
  125. .3    movem.l    (sp)+,d1
  126.     JSRLIB    Close
  127.  
  128. .2    movem.l    (sp)+,d0
  129. .1    move.l    #err_nomem,d1        ;Ignored, if d0 not 0
  130.     rts                ;Result in d0 available for now
  131.  
  132. drv_Done:
  133.     movea.l    a0,a1
  134.     cmpa.l    #0,a1
  135.     beq.b    .1
  136.     move.l    4.w,a6
  137.     JSRLIB    FreeVec        ;Deallocate handler
  138. .1
  139.     rts
  140.  
  141. drv_Configure:            ;Configure
  142.                 ;A simple screenmode requester appears
  143.     movem.l    a0,-(sp)
  144.     move.l    screendim(a0),displayid
  145.     move.l    #ASL_ScreenModeRequest,d0    
  146.     move.l    aslbase(a0),a6
  147.     lea    asltags,a0
  148.     JSRLIB    AllocAslRequest
  149.     move.l    (sp),a0
  150.     move.l    d0,scrmodereq(a0)
  151.     tst.l    d0
  152.     bne.b    config2
  153.     move.l    intuibase(a0),a6
  154.     JSRLIB    DisplayBeep
  155.     lea    4(sp),sp
  156.     rts
  157.  
  158. config2:
  159.     move.l    d0,a0
  160.     suba.l    a1,a1
  161.     JSRLIB    AslRequest
  162.     tst.l    d0
  163.     beq.b    .1
  164.  
  165.     move.l    (sp),a1
  166.     move.l    scrmodereq(a1),a0
  167.     move.l    sm_DisplayID(a0),screendim(a1)
  168.  
  169.     move.l    dosbase(a1),a6        ;Writing config file
  170.     move.l    #configfile,d1        ;Config file is pretty simple:
  171.     move.l    #MODE_NEWFILE,d2    ;only a screenmode number
  172.     JSRLIB    Open
  173.     tst.l    d0
  174.     beq.b    .1            ;Failed open
  175.     move.l    d0,d1
  176.     move.l    (sp),a0
  177.     lea    screendim(a0),a0
  178.     move.l    a0,d2
  179.     moveq.l    #4,d3
  180.     movem.l    d0,-(sp)
  181.     JSRLIB    Write            ;Writing the 4 bytes
  182.  
  183.     movem.l    (sp)+,d1        ;We don't care too much on
  184.     JSRLIB    Close            ;success...
  185.  
  186. .1    movem.l    (sp)+,a0
  187.     move.l    aslbase(a0),a6
  188.     move.l    scrmodereq(a0),a0
  189.     JSRLIB    FreeAslRequest
  190.     rts
  191.  
  192. drv_OpenScreen:
  193.     movea.l a0,a5
  194.     move.w    (a1)+,xsize(a5)
  195.     move.w    (a1)+,ysize(a5)
  196.     move.l    (a1)+,palette(a5)
  197.     move.l    screendim(a5),screenmode    ;screenmode from init
  198.  
  199.     moveq.l    #0,d0
  200.     move.l    d0,d1
  201.     move.w    xsize(a5),d0
  202.     move.w    ysize(a5),d1
  203.     mulu.w    d1,d0
  204.     move.l    d0,chunkysize(a5)
  205.     move.l    #MEMF_PUBLIC|MEMF_CLEAR,d1
  206.     move.l    4.w,a6
  207.     JSRLIB    AllocVec
  208.     move.l    d0,emuscr(a5)        ;allocating emulator screen
  209.     tst.l    d0
  210.     beq.w    .1
  211.  
  212.     move.l    chunkysize(a5),d0
  213.     move.l    #MEMF_PUBLIC|MEMF_CLEAR,d1
  214.     move.l    4.w,a6
  215.     JSRLIB    AllocVec
  216.     move.l    d0,delta(a5)        ;allocating delta buffer
  217.     tst.l    d0
  218.     beq.w    .1
  219.  
  220.     move.l    #MEMF_PUBLIC,d1
  221.     move.l    #128*3*4+4+16,d0
  222.     JSRLIB    AllocVec
  223.     move.l    d0,palette32(a5)    ;Convert palette to 32 bit per gun
  224.     beq.w    .1
  225.     movea.l    d0,a0
  226.         move.l    palette(a5),a1
  227.     move.w    #128,(a0)+
  228.     move.w    #$0,(a0)+
  229.     move.l    #128*3-1,d2
  230. .2    moveq.l    #0,d0
  231.     move.b    (a1)+,d0
  232.     swap    d0
  233.     asl.l    #8,d0
  234.     move.l    d0,(a0)+
  235.     dbf    d2,.2
  236.     move.l    #0,(a0)+
  237.     move.l    #0,(a0)+
  238.     move.l    #0,(a0)+
  239.     move.l    #0,(a0)+
  240.     move.w    xsize(a5),width+2
  241.     move.w    ysize(a5),height+2
  242.     move.l    palette32(a5),pal
  243.  
  244.         suba.l    a0,a0            ;No newscreen stuct
  245.         lea    scrtags,a1
  246.     movea.l    intuibase(a5),a6
  247.     JSRLIB    OpenScreenTagList
  248.     move.l    d0,myscr(a5)
  249.     beq.w    .1
  250.     move.l    d0,wscr
  251.     move.l    d0,a0
  252.     lea    sc_RastPort(a0),a0
  253.     movea.l    rp_BitMap(a0),a0
  254.     move.l    #BMA_FLAGS,d1
  255.     movea.l    graphbase(a5),a6
  256.     JSRLIB    GetBitMapAttr
  257.     and.l    #BMF_STANDARD|BMF_INTERLEAVED,d0
  258.     cmp.l    #BMF_STANDARD|BMF_INTERLEAVED,d0
  259.     beq.b    .3
  260.     movea.l    intuibase(a5),a6
  261.     move.l    myscr(a5),a0
  262.     JSRLIB    CloseScreen
  263.     moveq.l    #0,d0
  264.     move.l    d0,myscr(a5)
  265.     bra.b    .1
  266.  
  267. .3    move.w    xsize(a5),wwidth+2
  268.     move.w    ysize(a5),wheight+2
  269.     suba.l    a0,a0
  270.     lea    wintags,a1
  271.     movea.l    intuibase(a5),a6
  272.     JSRLIB    OpenWindowTagList
  273.     move.l    d0,mywin(a5)
  274.     beq.b    .1
  275.     movea.l    d0,a1
  276.     move.l  wd_RPort(a1),a0
  277.     move.l    rp_BitMap(a0),a0
  278.     move.l    bm_Planes(a0),planes(a5)
  279.     move.w    bm_BytesPerRow(a0),d0
  280.     and.l    #$ffff,d0
  281.     moveq.l    #7,d1
  282.     divu.w    d1,d0
  283.     move.w    d0,bytesperrow(a5)
  284.     move.l  wd_UserPort(a1),d0    ;IDCMP port
  285.     move.l    emuscr(a5),d2        ;chunky buffer
  286.  
  287. .1    move.l    #err_noscr,d1
  288.     moveq.l    #0,d3            ;no chunky modulo
  289.     rts
  290.  
  291. drv_CloseScreen:
  292.     move.l    a0,a5
  293.     move.l    intuibase(a5),a6
  294.     move.l    mywin(a5),a0
  295.     cmpa.l    #0,a0
  296.     beq.b    .1
  297.     JSRLIB    CloseWindow
  298.  
  299. .1    move.l    myscr(a5),a0
  300.     cmpa.l    #0,a0
  301.     beq.b    .2
  302.     JSRLIB    CloseScreen
  303.  
  304. .2    movea.l    palette32(a5),a1
  305.         cmpa.l    #0,a1
  306.     beq.b    .3
  307.     move.l    4.w,a6
  308.     JSRLIB    FreeVec        ;Deallocate translated palette
  309.  
  310. .3    movea.l    emuscr(a5),a1
  311.         cmpa.l    #0,a1
  312.     beq.b    .5
  313.     move.l    4.w,a6
  314.     JSRLIB    FreeVec        ;Deallocate chunky buffer
  315.  
  316. .5    movea.l    delta(a5),a1
  317.         cmpa.l    #0,a1
  318.     beq.b    .4
  319.     move.l    4.w,a6
  320.     JSRLIB    FreeVec        ;Deallocate delta buffer
  321.  
  322. .4    moveq.l    #0,d0
  323.     move.l    d0,emuscr(a5)    ;They were already freed
  324.     move.l    d0,delta(a5)
  325.     move.l    d0,palette32(a5)
  326.     move.l    d0,myscr(a5)
  327.     move.l    d0,mywin(a5)
  328.  
  329.     rts
  330.  
  331. drv_Refresh:
  332.     suba.l    #c2p_SIZEOF,a7        ;Storing all data on stack
  333.  
  334.     move.l    (emuscr,a0),(C2PChunkyBufferAddress,a7)
  335.     move.l    (delta,a0),(C2PDeltaBufferAddress,a7)
  336.     move.l    (planes,a0),(C2PPlanarBufferAddress,a7)
  337.     move.l    (delta,a0),(emuscr,a0)            ;exchange chunky and
  338.     move.l    (C2PChunkyBufferAddress,a7),(delta,a0)    ;delta buffer
  339.  
  340.     moveq.l    #0,d0
  341.     move.w    (xsize,a0),d0
  342.     move.l    d0,(C2PChunkyBufferWidth,a7)
  343.     lsr.l    #3,d0
  344.     move.l    d0,(C2PChunkyBufferWidthDiv8,a7)
  345.     move.w    (ysize,a0),d0
  346.     move.l    d0,(C2PChunkyBufferHeight,a7)
  347.     move.w    (bytesperrow,a0),d0
  348.     move.l    d0,(C2PBitplaneByteWidth,a7)
  349.     move.l    (chunkysize,a0),(C2PChunkyBufferSize,a7)
  350.  
  351.         move.l  (C2PChunkyBufferAddress,a7),a0
  352.     move.l    (C2PDeltaBufferAddress,a7),a1
  353.         move.l  (C2PChunkyBufferSize,a7),d0
  354.         lea     (a0,d0.L),a3
  355.  
  356.         move.l  (C2PPlanarBufferAddress,a7),a2
  357.  
  358.         move.l  (C2PBitplaneByteWidth,a7),D7
  359.  
  360. .12    move.l    (C2PChunkyBufferWidth,a7),d6
  361.     lsr.l    #5,d6
  362.  
  363. .11    cmp.l    (a0)+,(a1)+
  364.     bne.b    .1
  365.     cmp.l    (a0)+,(a1)+
  366.     bne.b    .2
  367.     cmp.l    (a0)+,(a1)+
  368.     bne.b    .3
  369.     cmp.l    (a0)+,(a1)+
  370.     bne.b    .4
  371.     cmp.l    (a0)+,(a1)+
  372.     bne.b    .5
  373.     cmp.l    (a0)+,(a1)+
  374.     bne.b    .6
  375.     cmp.l    (a0)+,(a1)+
  376.     bne.b    .7
  377.     cmp.l    (a0)+,(a1)+
  378.     bne.b    .8
  379.  
  380. .10    addq.l    #4,a2
  381.  
  382.     subq.l    #1,d6
  383.     bne.b    .11
  384.  
  385.     suba.l    (C2PChunkyBufferWidthDiv8,a7),a2
  386.     lea    (a2,d7.l*8),a2
  387.     sub.l    d7,a2
  388.  
  389.     cmp.l    a0,a3
  390.     bne.b    .12
  391.  
  392.  
  393.     move.l    C2PDeltaBufferAddress(a7),d0    ;giving back chunky buffer
  394.         adda.l    #c2p_SIZEOF,a7            ;changed to delta buffer
  395.     
  396.         rts
  397.  
  398. .1    subq.l    #1*4,a0
  399.     add.l    #7*4,a1
  400.     bra.b    .9
  401.  
  402. .2    subq.l    #2*4,a0
  403.     add.l    #6*4,a1
  404.     bra.b    .9
  405.  
  406. .3    sub.l    #3*4,a0
  407.     add.l    #5*4,a1
  408.     bra.b    .9
  409.  
  410. .4    sub.l    #4*4,a0
  411.     add.l    #4*4,a1
  412.     bra.b    .9
  413.  
  414. .5    sub.l    #5*4,a0
  415.     add.l    #3*4,a1
  416.     bra.b    .9
  417.  
  418. .6    sub.l    #6*4,a0
  419.     addq.l    #2*4,a1
  420.     bra.b    .9
  421.  
  422. .7    sub.l    #7*4,a0
  423.     addq.l    #1*4,a1
  424.     bra.b    .9
  425.  
  426. .8    sub.l    #8*4,a0
  427.     add.l    #0*4,a1
  428.  
  429. .9    move.l    #$0F0F0F0F,d5
  430.  
  431.     move.l    (a0)+,d0
  432.     and.l    d5,d0
  433.     lsl.l    #4,d0
  434.     move.l    (a0)+,d1
  435.     and.l    d5,d1
  436.     or.l    d1,d0
  437.  
  438.     move.l    (a0)+,d1
  439.     and.l    d5,d1
  440.     lsl.l    #4,d1
  441.     move.l    (a0)+,d2
  442.     and.l    d5,d2
  443.     or.l    d2,d1
  444.  
  445.     move.l    (a0)+,d2
  446.     and.l    d5,d2
  447.     lsl.l    #4,d2
  448.     move.l    (a0)+,d3
  449.     and.l    d5,d3
  450.     or.l    d3,d2
  451.  
  452.     move.l    (a0)+,d3
  453.     and.l    d5,d3
  454.     lsl.l    #4,d3
  455.     move.l    (a0)+,d4
  456.     and.l    d5,d4
  457.     or.l    d4,d3
  458.  
  459.     move.w    d2,d4
  460.     move.w    d0,d2
  461.     swap    d2
  462.     move.w    d2,d0
  463.     move.w    d4,d2
  464.  
  465.     move.w    d3,d4
  466.     move.w    d1,d3
  467.     swap    d3
  468.     move.w    d3,d1
  469.     move.w    d4,d3
  470.  
  471.     move.l    #$00FF00FF,d5
  472.  
  473.     move.l    d1,d4
  474.     lsr.l    #8,d4
  475.     eor.l    d0,d4
  476.     and.l    d5,d4
  477.     eor.l    d4,d0
  478.     lsl.l    #8,d4
  479.     eor.l    d4,d1
  480.  
  481.     move.l    d3,d4
  482.     lsr.l    #8,d4
  483.     eor.l    d2,d4
  484.     and.l    d5,d4
  485.     eor.l    d4,d2
  486.     lsl.l    #8,d4
  487.     eor.l    d4,d3
  488.  
  489.     move.l    #$33333333,d5
  490.  
  491.     move.l    d2,d4
  492.     lsr.l    #2,d4
  493.     eor.l    d0,d4
  494.     and.l    d5,d4
  495.     eor.l    d4,d0
  496.     lsl.l    #2,d4
  497.     eor.l    d4,d2
  498.  
  499.     move.l    d3,d4
  500.     lsr.l    #2,d4
  501.     eor.l    d1,d4
  502.     and.l    d5,d4
  503.     eor.l    d4,d1
  504.     lsl.l    #2,d4
  505.     eor.l    d4,d3
  506.  
  507.     move.l    #$55555555,d5
  508.  
  509.     move.l    d1,d4
  510.     lsr.l    #1,d4
  511.     eor.l    d0,d4
  512.     and.l    d5,d4
  513.     eor.l    d4,d0
  514.     lsl.l    #1,d4
  515.     eor.l    d4,d1
  516.  
  517.     move.l    d1,(a2,d7.l*2)
  518.  
  519.     move.l    d3,d4
  520.     lsr.l    #1,d4
  521.     eor.l    d2,d4
  522.     and.l    d5,d4
  523.     eor.l    d4,d2
  524.     lsl.l    #1,d4
  525.     eor.l    d4,d3
  526.  
  527.     move.l    d0,a4
  528.     move.l    d2,a5
  529.     move.l    d3,a6
  530.  
  531.     sub.l    #8*4,a0
  532.  
  533.     move.l    #$F0F0F0F0,d5
  534.  
  535.     move.l    (a0)+,d0
  536.     and.l    d5,d0
  537.     move.l    (a0)+,d1
  538.     and.l    d5,d1
  539.     lsr.l    #4,d1
  540.     or.l    d1,d0
  541.  
  542.     move.l    (a0)+,d1
  543.     and.l    d5,d1
  544.     move.l    (a0)+,d2
  545.     and.l    d5,d2
  546.     lsr.l    #4,d2
  547.     or.l    d2,d1
  548.  
  549.     move.l    (a0)+,d2
  550.     and.l    d5,d2
  551.     move.l    (a0)+,d3
  552.     and.l    d5,d3
  553.     lsr.l    #4,d3
  554.     or.l    d3,d2
  555.  
  556.     move.l    (a0)+,d3
  557.     and.l    d5,d3
  558.     move.l    (a0)+,d4
  559.     and.l    d5,d4
  560.     lsr.l    #4,d4
  561.     or.l    d4,d3
  562.  
  563.     move.l    a6,(a2)
  564.  
  565.     move.w    d2,d4
  566.     move.w    d0,d2
  567.     swap    d2
  568.     move.w    d2,d0
  569.     move.w    d4,d2
  570.  
  571.     move.w    d3,d4
  572.     move.w    d1,d3
  573.     swap    d3
  574.     move.w    d3,d1
  575.     move.w    d4,d3
  576.  
  577.     move.l    #$00FF00FF,d5
  578.  
  579.     move.l    d1,d4
  580.     lsr.l    #8,d4
  581.     eor.l    d0,d4
  582.     and.l    d5,d4
  583.     eor.l    d4,d0
  584.     lsl.l    #8,d4
  585.     eor.l    d4,d1
  586.  
  587.     move.l    a5,(a2,d7.l)
  588.  
  589.     move.l    d3,d4
  590.     lsr.l    #8,d4
  591.     eor.l    d2,d4
  592.     and.l    d5,d4
  593.     eor.l    d4,d2
  594.     lsl.l    #8,d4
  595.     eor.l    d4,d3
  596.  
  597.     move.l    #$33333333,d5
  598.  
  599.     move.l    d2,d4
  600.     lsr.l    #2,d4
  601.     eor.l    d0,d4
  602.     and.l    d5,d4
  603.     eor.l    d4,d0
  604.     lsl.l    #2,d4
  605.     eor.l    d4,d2
  606.  
  607.     add.l    d7,a2
  608.     move.l    a4,(a2,d7.l*2)
  609.     sub.l    d7,a2
  610.  
  611.     move.l    d3,d4
  612.     lsr.l    #2,d4
  613.     eor.l    d1,d4
  614.     and.l    d5,d4
  615.     eor.l    d4,d1
  616.     lsl.l    #2,d4
  617.     eor.l    d4,d3
  618.  
  619.     move.l    #$55555555,d5
  620.  
  621.     and.l    d5,d0
  622.     lsl.l    #1,d0
  623.     and.l    d5,d1
  624.     or.l    d0,d1
  625.  
  626.     lea    (a2,d7.l*4),a2
  627.     move.l    d1,(a2,d7.l*2)
  628.  
  629.     move.l    d3,d4
  630.     lsr.l    #1,d4
  631.     eor.l    d2,d4
  632.     and.l    d5,d4
  633.     eor.l    d4,d2
  634.     lsl.l    #1,d4
  635.     eor.l    d4,d3
  636.  
  637.     move.l    d3,(a2)
  638.     move.l    d2,(a2,d7.l)
  639.  
  640.     lsl.l    #2,d7
  641.     sub.l    d7,a2
  642.     lsr.l    #2,d7
  643.  
  644.     bra.w    .10
  645.  
  646.     EVEN
  647.  
  648. ;*** Constants
  649.  
  650. scrtags:
  651.     dc.l    SA_Width
  652. width:    dc.l    0
  653.     dc.l    SA_Height
  654. height:    dc.l    0
  655.     dc.l    SA_Depth,7
  656.     dc.l    SA_Colors32
  657. pal:    dc.l    0
  658.     dc.l    SA_Title,scrtitle
  659.     dc.l    SA_ShowTitle,FALSE
  660.     dc.l    SA_DisplayID
  661. screenmode:
  662.     dc.l    0
  663.     dc.l    SA_Interleaved,TRUE
  664.     dc.l    SA_Type,CUSTOMSCREEN
  665.     dc.l    SA_AutoScroll,TRUE
  666.     dc.l    SA_Overscan,OSCAN_STANDARD
  667.     dc.l    SA_Quiet,TRUE
  668.     dc.l    TAG_DONE
  669.  
  670. wintags:
  671.     dc.l    WA_Left,0
  672.     dc.l    WA_Top,0
  673.     dc.l    WA_Width
  674. wwidth:    dc.l    0
  675.     dc.l    WA_Height
  676. wheight:    dc.l    0
  677.     dc.l    WA_IDCMP,IDCMP_RAWKEY
  678.     dc.l    WA_Title,0
  679.     dc.l    WA_Backdrop,TRUE
  680.     dc.l    WA_RMBTrap,TRUE
  681.     dc.l    WA_Borderless,TRUE
  682.     dc.l    WA_NoCareRefresh,TRUE
  683.     dc.l    WA_CustomScreen
  684. wscr:    dc.l    0
  685.     dc.l    WA_SimpleRefresh,TRUE
  686.     dc.l    WA_Activate,TRUE
  687.     dc.l    TAG_DONE
  688.  
  689. asltags:
  690.     dc.l    ASLSM_TitleText,configwintxt
  691.     dc.l    ASLSM_InitialDisplayID
  692. displayid:
  693.     dc.l    0
  694.     dc.l    TAG_DONE
  695.  
  696. scrtitle:    dc.b    'Flamingo Plus/4 emulator screen',0
  697.  
  698. configwintxt:    dc.b    'Choose desired screenmode',0
  699.  
  700. configfile:    dc.b    'aga-delta.cfg',0
  701.  
  702. ;*** Errors
  703.  
  704. err_nomem:
  705.     dc.b    'Run out of memory',0
  706. err_noscr:
  707.     dc.b    'Cannot open screen',0
  708.